import React, { Component } from 'react';

import '../../styles/list.scss'

import pic2 from '../../img/pic2.jpg'

class List extends Component {
    constructor(props){
        super(props)
        this.state = {
            list:[
                { pic:pic2 , text : '当代程序员' , money : 28888 },
                { pic:pic2 , text : '当代程序员' , money : 28888 },
                { pic:pic2 , text : '当代程序员' , money : 28888 },
                { pic:pic2 , text : '当代程序员' , money : 28888 },
                { pic:pic2 , text : '当代程序员' , money : 28888 },
                { pic:pic2 , text : '当代程序员' , money : 28888 },
                { pic:pic2 , text : '当代程序员' , money : 28888 },
                { pic:pic2 , text : '当代程序员' , money : 28888 },
                { pic:pic2 , text : '当代程序员' , money : 28888 },
                { pic:pic2 , text : '当代程序员' , money : 28888 },
                { pic:pic2 , text : '当代程序员' , money : 28888 },
                { pic:pic2 , text : '当代程序员' , money : 28888 },
                { pic:pic2 , text : '当代程序员' , money : 28888 },
                { pic:pic2 , text : '当代程序员' , money : 28888 },
            ]
        }
    }
    render() {
        return (
            <div className='shoplist'>
                {
                    this.state.list.map((item , index) => {
                        return (
                            <div className="shops" key={index}>
                                <img src={item.pic} alt="" />
                                <h5> {item.text} </h5>
                                <div className="money">最低价： {item.money} 元</div>
                            </div>
                        )
                    })
                }
            </div>
        );
    }
}

export default List;